<%@ page import="br.com.rosena.control.ControllerRosena" %>
<%@ page import="java.sql.ResultSet" %>
<%
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0
    response.setDateHeader("Expires", -1); //evita o caching no servidor proxy
    request.getSession(true);
    session.removeAttribute("ID_Usuario");
    session.removeAttribute("USUARIO");
    session.removeAttribute("FILIAL");
    session.removeAttribute("session");
    br.com.rosena.util.Util.setCaminhoAplicacao(application.getRealPath("/"));
    br.com.rosena.util.Util.setPortaAplicacao( String.valueOf(request.getServerPort()) );
    br.com.rosena.util.Util.setSessionId(request.getSession().getId() );

    ResultSet crs = new ControllerRosena().execultarQueryReturResultSet("Select id, descricao from ConfiguracaoGeral ");
    String error = request.getParameter("error") != null ? request.getParameter("error") : "";
%>
<html>
<head>
    <title>Index</title>
</head>
<body>
<form name="frm" action="acesso.jsp" method="post">
    <div align="center">
        <select name="txtConfiguracao">
            <%while(crs.next()){%>
                <option value="<%=crs.getString("id")%>"><%=crs.getString("descricao")%></option>
            <%}%>
        </select>
    </div>
    <div align="center">
        Usuario:
        <input type="text" name="txtUsuario" id="txtUsuario" value=""><br>
        Senha:
        <input type="password" name="txtSenha" id="txtSenha" value=""><br>
        <input type="submit">
    </div>
    <div align="center">
        <%=error%>
    </div>
</form>
</body>
</html>